#include <cstdio>
int main(){printf("153\n370\n371\n407\n");return 0;}
